package com.uade.empresasdistribuidas.entities;

import java.sql.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name= "ControlesRealizados") 
public class ControlRealizadoDTO {
	
	@Id@GeneratedValue
	@Column(name="codigoControl" ,unique = true, nullable = false)
	private Integer codigoControl;
	
	@Column(name="fechaInicio", nullable=false)
	private Date fechaInicio;
	
	@Column(name="fechaFin", nullable=false)
	private Date fechaFin;
	
	
	@Column(name="tipoDeControl", nullable=false, length=30)
	private String tipoDeControl;
	
	@Column(name="descripcion", nullable=false, length=100)
	private String descripcion;
	
	@ManyToOne(cascade=CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name="codigoTaller")
	private TallerDTO taller;
	

}
